1. Field of the Invention
This invention relates to a method of and system for image processing for trimming, and more particularly, to a method of and system for image processing for trimming photographic images of objects comprising a plurality of parts. This invention further relates to a computer program for the image processing.
2. Description of the Related Art
For example, application of a passport or a license or making own personal history often requires a photograph of his or her face output in a predetermined standard (will be referred to as “a certification photograph”, hereinbelow.) For this purpose, a studio for taking a photograph of the user has been provided and there has been used an automatic camera which automatically takes a photograph of the user seated on a chair in the studio and makes a certification photograph sheet on which a photograph of his or her face is recorded. Such an automatic photograph system is inconvenient in that the place of installment is limited since it is cumbersome, and the user has to find it and visit it in order to obtain the certification photograph.
In order to overcome this problem, it has been proposed to obtain the position of the face from the photographic image of the face employed in making a certification photograph, set a trimming area on the basis of the standard of the certification photograph so that the photographic image of the face is positioned in a predetermined position in the certification photograph, and cut out the image in the trimming area, thereby forming the certification photograph. With this method, the user can request a certification photograph of a DPE shop or the like which exists more than the automatic photograph systems and at the same time, the user can request a DPE shop or the like to make a certification photograph from a photograph which he or she favors.
From the characteristics of the certification photograph, it is necessary that the image of the whole face is in the trimming area and the trimming area is laterally symmetrical about the center of the image of the face. Accordingly, when setting the trimming area, generally, the centerline of the face is set to be the centerline of the trimming (will be referred to as “the trimming centerline”, hereinbelow) and the area which is laterally symmetrical about the trimming centerline is set to be the trimming area. The centerline of the face may be a straight line joining the middle point between eyes, the center point of the nose and the center point of the mouth as disclosed in Japanese Unexamined Patent Publication No. 2003-092726 and the frame of the trimming area may be set so that the centerline of the face is taken as the trimming centerline and the vertical lines are parallel to the trimming centerline. With this method, even if the image of the face in the input photographic image is inclined (FIG. 21A), it is possible to set the image of the face not to be inclined (FIG. 21C).
However, the method disclosed in Japanese Unexamined Patent Publication No. 2003-092726 is disadvantageous in that, though it is possible to carry out trimming so that neither the image of the face nor the image of the trunk is inclined if the image of the face and the image of the trunk are inclined in substantially the same degree in substantially the same direction when taking the photograph, the trimmed image is bad in its balance as a whole e.g., the inclination of the image of the trunk can be very hard as shown in FIG. 21C or the image of the trunk can be abnormally small, when the photograph is trimmed with the centerline of the face taken as the trimming centerline if the images of the face and the trunk which originally should have the same centerline have different centerlines, e.g., only the image of the face is inclined.